﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Library.DB.Board;
using Com.Framework;
using Com.Library.Cookie;

namespace Com.Web.coffinegurunaru.whatsnew
{
	public partial class notice : WebPage
	{
		public List<ArticleEntity> List { get; set;}
		public byte PageSize { get{ return (byte)10; } }
		public int PageNo { get; set; }
		public int CntTotal { get; set; }
		public string SearchWord { get ;set; }
		public string SearchType { get ;set; }

		protected void Page_Load(object sender, EventArgs e)
		{
			PageNo = Request["pageno"].Parse(1);
			SearchWord = Request["searchWord"];
			SearchType = Request["searchType"].Parse("0");

			int cntTotal = 0;
			List = ArticleModel.GetList((byte)ArticleModel.BoardSNEnum.Notice, SearchWord, PageNo, PageSize, out cntTotal); 

			CntTotal = cntTotal;
			this.LeftMenuType = 2;

			UC_Paging.TotalCount = CntTotal;
			UC_Paging.PageName = "PageNo";
			UC_Paging.PageNo = PageNo;
			UC_Paging.PageSize = PageSize;
			UC_Paging.Query = "searchType=" + SearchType + "&searchWord=" + Server.UrlEncode(SearchWord);
		}

		protected override void OnPreRender(EventArgs e)
		{
			base.OnPreRender(e);
		}
	}
}
